#ifndef SD_CARD_H
#define SD_CARD_H

#include "esp_err.h"

#ifdef __cplusplus
extern "C" {
#endif


#define BSP_SD_CLK          GPIO_NUM_8
#define BSP_SD_CMD          GPIO_NUM_15
#define BSP_SD_D0           GPIO_NUM_13


// #define BSP_SD_CLK          (GPIO_NUM_2)
// #define BSP_SD_CMD          (GPIO_NUM_1)
// #define BSP_SD_D0           (GPIO_NUM_14)


bool sd_card_is_mounted(void);
esp_err_t write_text_to_sd(const char* filename, const char* text);
// esp_err_t read_text_from_sd(const char* filename);

void sd_card_init();


extern size_t global_gif_data_size;
extern uint8_t* global_gif_data;

void free_gif_data();

#ifdef __cplusplus
}
#endif

#endif // SD_CARD_H
